#include <cs50.h>
#include <stdio.h>

#define COUNT 10

int main () {
	int a[COUNT];

	for (int i=0; i<COUNT; i++) {
		printf("请输入%d个数的第%d个：", COUNT, i+1);
		a[i] = GetInt();
	}

	int psum = 0;
	int nsum = 0;

	for (int i=0; i<COUNT; i++) {
		if (a[i] > 0) {
			psum = psum + a[i];
		} else {
			nsum = nsum + a[i];
		}
	}

	printf("正数的和是：%d，负数的和是：%d，总和是：%d\n", psum, nsum, psum + nsum);
}
